package com.baomibing.flow.enginee;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomibing.flow.execute.Execution;
import com.baomibing.flow.model.WorkFlow;
import lombok.Data;
import lombok.ToString;

/**
 * Process
 *
 * @author frog 2023/9/20 16:58
 * @version 1.0.0
 **/
@Data @ToString
public abstract class Process {

    @JSONField(serialize = false)
    protected WorkFlow flow;

    protected String processType;

    public Process(WorkFlow flow) {
        this.flow = flow;
    }

    public abstract boolean doProcess(Execution execution);

    public abstract boolean doReject(Execution execution);

    public abstract boolean beComplete();

}
